package com.atguigu.ssyx;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.core.env.Environment;

@SpringBootApplication(exclude = DataSourceAutoConfiguration.class) //禁用数据源
@EnableDiscoveryClient
@EnableFeignClients
public class ServiceHomeApplication {
    private static final Logger logger = LoggerFactory.getLogger(ServiceHomeApplication.class.getName());

    public static void main(String[] args) {
        SpringApplication app = new SpringApplication(ServiceHomeApplication.class);
        Environment env = app.run(args).getEnvironment();
        logger.info("启动成功！！");
        logger.info("ServiceHome地址: \t http://127.0.0.1:{}", env.getProperty("server.port"));
    }
}
